Abstract We still wonder why we sleep. We know at least that sleep helps our memory. Almost every stages and features of sleep are involved memory consolidation, including non-rapid eye movement slow wave sleep (NREM SWS), NREM spindles, REM theta rhythm and sleep architecture continuity. Disruption of these stages and features are found in all neurological disorders afflicting memory (Angelman, autism spectrum, alcoholism, Alzheimer's, fragile X, Huntington's, Parkinson's, Rett etc?). The mechanisms underpinning these memory deficits are poorly understood and the role of sleep at the synapse is still highly debated. Synpases are the central physiological structures underpinning memory and cognition, but how each sleep stages and features remodels synapses remains unclear. NREM SWS and total sleep have been implicated in general synaptic downscaling, but NREM and spindles have also been involved in synaptic strengthening; similarly REM has been associated to both synapse pruning and maintenance. One major obstacle to such study has been that sleep stages and features are all interconnected and integrated. The disruption of one often impacts the others making the association between a stage/feature and a specific synaptic function challenging. Using precise optogenetic control of neuronal circuits, we have overcome this obstacle. Sleep continuity and memory consolidation can be disrupted without changing overall sleep architecture and quantity by introducing micro-arousals (<2sec) every 60 sec using hypocretin neuron stimulation (Aim 1). NREM sleep spindles and memory consolidation can be elicited by stimulating reticular thalamus neurons without disturbing sleep (Aim 2). Theta rhythms and memory consolidation can be disrupted by silencing medial septum GABA neurons during REM bouts only without affecting sleep architecture integrity (Aim 3). We will manipulate these three sleep features after a cortical motor learning task which rapidly induces synapse formation in the motor cortex. Remodeling of these newly formed synapses and their neighbors will be followed using state-of-the-art in vivo (two-photon) and ex vivo (array tomography) synapse microscopy. While the former longitudinal analysis will uncover the spine dynamics leading to memory encoding consolidation, the latter global synapse analysis will reveal how synapse classes (inhibitory, excitatory), synapse populations (depending on layers) and their subsynaptic molecular components are remodeled by sleep continuity (Aim 1), spindles (Aim 2) and REM specifically (Aim 3). The specific use of optogenetics to manipulate different sleep stages as synaptic dynamics are studied is unprecedented and will shed important light on how sleep continuity, NREM spindles, and REM can each influence cortical synaptic plasticity underpinning memory consolidation after motor learning. These discoveries are crucial for future strategies to recover and treat memory and cognitive deficits in neurodevelopmental and neurodegenerative disorders.